package com.lzx.adx.report.dao;

import com.lzs.adx.commmon.dao.BaseDao;
import com.lzx.adx.report.entity.BackDataEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 
 *
 * @author wangzhijun 825400558@qq.com
 * @since 1.0.0 2024-07-05
 */
@Mapper
public interface BackDataDao extends BaseDao<BackDataEntity> {

    @Select("select count(*) from t_back_data where  dsp_id=#{id} and event_type=#{callType}")
    long countTotal(String id, String callType);

    @Select("select count(*) from t_back_data where  dsp_id=#{id} and event_type=#{callType} and day=#{day}")
    long countCurrentDayTotal(@Param("id") String id, @Param("callType")String callType, @Param("day")String day);
}